<template>
  <div class="menu-container">
    <h1 class="menu-title">管理系统</h1>
    <nav class="menu-nav">
      <ul class="menu-list">
        <li class="menu-item">
          <button 
            @click="selectMenu('user')" 
            :class="{ active: activeMenu === 'user' }"
            class="menu-button"
          >
            用户管理
          </button>
        </li>
        <li class="menu-item">
          <button 
            @click="selectMenu('order')" 
            :class="{ active: activeMenu === 'order' }"
            class="menu-button"
          >
            订单管理
          </button>
        </li>
        <li class="menu-item">
          <button 
            @click="selectMenu('simulator')" 
            :class="{ active: activeMenu === 'simulator' }"
            class="menu-button"
          >
            我的模拟室_粗放
          </button>
        </li>
        <li class="menu-item">
          <button 
            @click="selectMenu('claude-simulator')" 
            :class="{ active: activeMenu === 'claude-simulator' }"
            class="menu-button"
          >
            我的模拟室_claude
          </button>
        </li>
      </ul>
    </nav>
  </div>
</template>

<script>
export default {
  name: 'Menu',
  props: {
    activeMenu: {
      type: String,
      default: ''
    }
  },
  methods: {
    selectMenu(menuType) {
      this.$emit('menu-selected', menuType);
    }
  }
}
</script>

<style scoped>
.menu-container {
  background-color: #2c3e50;
  color: white;
  padding: 20px;
  min-height: 100vh;
  width: 250px;
}

.menu-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: #ecf0f1;
}

.menu-nav {
  width: 100%;
}

.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.menu-item {
  margin-bottom: 10px;
}

.menu-button {
  width: 100%;
  padding: 15px 20px;
  background-color: #34495e;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
}

.menu-button:hover {
  background-color: #3498db;
  transform: translateX(5px);
}

.menu-button.active {
  background-color: #e74c3c;
}
</style>